<?php
namespace app\serverfund\model;

use \app\manage\model\BaseModel;

/**
 * @author:      李颖
 * @DateTime:    2017-08-31 11:16:08
 * @Description: 提现模型
 */
class Withdraw extends BaseModel
{
    protected $name = 'withdraw';
    protected $connection = 'db_config_fund';
    protected $dateFormat = 'Y-m-d H:i:s';
    protected $statusText = [0=>'等待', 1=>'审核成功', 2=>'审核失败', 3=>'转账失败', 4=>'转账完成'];
    protected $append = ['status_text'];

    public function setUserInfoAttr($value, $data)
    {
        return json_encode($data['user_info']);
    }
   
    public function getUserInfoAttr($value,$data)
    {
        return json_decode($data['user_info'], true);
    }

    public function setCardInfoAttr($value, $data)
    {
        return json_encode($data['card_info']);
    }
   
    public function getCardInfoAttr($value,$data)
    {
        return json_decode($data['card_info'], true);
    }

    public function setReviewInfoAttr($value, $data)
    {
        return json_encode($data['review_info']);
    }
   
    public function getReviewInfoAttr($value,$data)
    {
        return json_decode($data['review_info'], true);
    }

    public function setTransferInfoAttr($value, $data)
    {
        return json_encode($data['transfer_info']);
    }
   
    public function getTransferInfoAttr($value,$data)
    {
        return json_decode($data['transfer_info'], true);
    }
}
